/*
 * 项   目：learn-spring-boot
 * 作   者：罗毅（ymluo） 
 * 邮   箱：ymluo@iflytek.com
 * 创建时间：2017/11/16 15:05
 */
package com.roin.learn.springboot.websocket;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //这里增加对/ws请求的解析
        registry.addViewController("/ws").setViewName("/ws");
        registry.addViewController("/login").setViewName("/login");
        registry.addViewController("/chat").setViewName("/chat");
    }
}
